feat(claude): emit channel declarations bound to plugin MCP servers (#187) - #294
Conversation
🦋 Changeset detectedLatest commit: cafa511 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cafa511361
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| `Rename one channels[${index}].userConfig option so every key remains unique after uppercasing, then rebuild.`, | ||
| )); | ||
| } | ||
| const optionPlan = planClaudeUserConfigOption(key, userConfig[key]); |
There was a problem hiding this comment.
Point channel option diagnostics at the channel
When an option inside channels[index].userConfig is malformed, this shared helper emits claude.userConfig.* messages and recoveries such as Set userConfig.bot_token.type..., which refers to the unrelated top-level field and omits the channel index. In configurations with top-level options or multiple channels, following the reported recovery does not repair the offending declaration and the build remains blocked; pass the channel path/context into the helper so these diagnostics identify channels[index].userConfig.<key>.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 2530cc32. The shared option planner now accepts a path prefix, so channel diagnostics and recoveries identify channels[i].userConfig and emit indexed claude.channels[i].userConfig.* codes.
Summary
ClaudeHostConfiggainschannels: declarations emitted into.claude-plugin/plugin.json, each bound to a plugin MCP server. Per-channeluserConfigreuses the slice-1planClaudeUserConfigOptioncontract (same identifier, collision, and sensitive-default rules).claude.channels.declaration.invalid,.entry.invalid,.field.unknown,.server.required,.server.unknown,.userConfig.invalid,.key.invalid,.key.collision).claude plugin validate --strictaccepts a deliberately danglingserverbinding — the CLI never cross-checks.mcp.jsonkeys, soclaude.channels.server.unknownis the only pre-enable binding guard. Recorded honestly in capability evidence and PROVENANCE.channelschema added to plugin.schema.json reusing theuserConfigOption$defs; PROVENANCE notes record the tightenings (empty-array rejection, unknown-field rejection, duplicate-server declarations deliberately allowed).Test plan
pnpm typecheckpnpm lintPart of #187 (slice 2).